package com.springboothive.controller;

import com.springboothive.service.BusReceiverService;
import com.springboothive.vo.BusReceiverEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Date;

/**
 * TODO
 *
 * @author utsc1273
 * @version 1.0
 * @date 2021/9/8 18:10
 */
@RestController
public class TestController {
    @Resource
    private BusReceiverService busReceiverService;
    @GetMapping("/test")
    public void test(){
        busReceiverService.createTable();
    }
    @GetMapping("/add")
    public void test2(){
        BusReceiverEntity busReceiverEntity = new BusReceiverEntity();
        busReceiverEntity.setAddress("22112");
        busReceiverEntity.setEnName("cc");
        busReceiverEntity.setId(1);
        busReceiverEntity.setCreateDate(new Date());
        busReceiverEntity.setName("dsd");
        busReceiverEntity.setMemberFamily(1);
        busReceiverService.insert(busReceiverEntity);
    }

}
